home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / get_type_info < prev    next >
Text File  |  2001-04-06  |  1KB  |  40 lines

  1. SYNOPSIS
  2.         mixed get_type_info(mixed arg, int flag)
  3.  
  4. DESCRIPTION
  5.         Returns info about the type of arg, as controlled by the flag.
  6.  
  7.         If the optional argument <flag> is not a number, an array is
  8.         returned, whose first element is an integer denoting the data
  9.         type, as defined in <lpctypes.h>. The second entry can contain
  10.         additional information about arg.
  11.  
  12.         If <flag> flag is the number 0, only the first element of that array
  13.         (i.e. the data type) is returned (as int). If <flag> is 1, the
  14.         second element is returned.
  15.  
  16.         If <arg> is a closure, the <flag> setting 2 lets the efun
  17.         return the object the closure is bound to.
  18.         For every other <flag> setting, -1 is returned.
  19.  
  20.         The secondary information is:
  21.           - for mappings the width, ie the number of data items per key.
  22.           - for closures, symbols and quoted arrays the number of quotes.
  23.           - for strings 0 for shared strings, and non-0 for others.
  24.           - -1 for all other datatypes.
  25.  
  26. BUGS
  27.         This function seems to be due to frequent changes as the
  28.         driver develops resp. is debugged.
  29.  
  30. HISTORY
  31.         Introduced in 3.2@127
  32.         Flag setting 2 was introduced in 3.2.1@84.
  33.         Secondary string information was introduced in 3.2.7.
  34.         Up to 3.2.7 inclusive, get_type_info(closure,2) did not return
  35.           the object from a lambda closure or bound-lambda closure.
  36.  
  37. SEE ALSO
  38.         debug_info(E), typeof(E)
  39.  
  40.